<!DOCTYPE html>
<html lang="zh-cmn-Hans">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
		<title>就业工作协作平台</title>
		<link rel="stylesheet" href="css/main.css" />
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/weui.min.js"></script>
	</head>

	<body ontouchstart>
		<script type="text/javascript">
			/**
			 * 判断用户是否已经登录，如果没登录则进入登录，否则进入工作主页面
			 */
			weui.loading("正在努力进入");
			var token = localStorage.getItem("token");
			console.info(token);
			if(token==null){
				window.location.replace("login.html");
			}else{
				$.post(
					"user/check.do",
					{"token":token},
					function(data){
						if(data.ok){
							window.location.replace("main.html");
						}else{
							localStorage.removeItem("token");
							window.location.replace("login.html");
						}
					},"json"
				);
			}
			
		</script>
		
	</body>

</html>